Python3Script Xojo Plugin

Python3XojoModule Class (console safe)

A class to expose Xojo modules to Python 3

Python3Object
   Python3XojoModule

class Python3XojoModule

Constructors

Python3XojoModule (console safe) A Constructor that constructs Python3XojoModule from name.

Properties

Name (Inherited) (console safe) Returns the name of the object.

Methods

AddClass (console safe) Adds a class to the module.
ModuleCreateProc (console safe) A function to create a value to return in a ModuleInit handler.
RegisterFunction (console safe) Registers a Xojo function to expose to Python via this module

Examples


Dim xojoModule as Python3XojoModule

If not Python3Script.PythonIsFound() then
    MsgBox "Correct Python installation was not found on this machine"
    Quit()
else
    xojoModule = new Python3XojoModule("Xojo",2)
    xojoModule.RegisterFunction("TestHelloFromXojo",AddressOf XojoFunctionsForPython.TestHelloFromXojo)
    xojoModule.RegisterFunction("CalculateSomething",AddressOf XojoFunctionsForPython.CalculateSomething)
   
    XojoFunctionsForPython.ModuleHandle = xojoModule
   
    Python3Script.RegisterXojoModule(xojoModule, AddressOf XojoFunctionsForPython.ModuleInit)
   
    Python3Script.Init("TestApp")
end if

Supported Platforms:

  • macOS Intel 64 bit
  • macOS Apple Silicon
  • Windows 32 bit
  • Windows 64 bit
  • Windows ARM 64 bit
  • Linux 32 bit
  • Linux 64 bit
  • Linux ARM 32 bit
  • Linux ARM 64 bit